import { create } from 'zustand'

interface IToken {
  token: string,
}

const initialUserInfo = {
  token: ''
}

export const useTokenStore = create<IToken>()(() => ({
  ...initialUserInfo
}))

export const setToken = (token: string) =>  useTokenStore.setState({ token })
